package com.dbdata.move.model;

// Generated cafuc by Hibernate Tools 4

import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * StopAccessory generated by hbm2java
 */
@Entity
@Table(name = "stop_accessory")
public class StopAccessory implements java.io.Serializable {

	private Long id;
	private StopFly stopFly;
	private String fileName;
	private String url;
	private Date createTime;
	private long userId;

	public StopAccessory() {
	}

	public StopAccessory(StopFly stopFly, String fileName, String url,
			Date createTime, long userId) {
		this.stopFly = stopFly;
		this.fileName = fileName;
		this.url = url;
		this.createTime = createTime;
		this.userId = userId;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "ID", unique = true, nullable = false)
	public Long getId() {
		return this.id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "STOP_FLY_ID", nullable = false)
	public StopFly getStopFly() {
		return this.stopFly;
	}

	public void setStopFly(StopFly stopFly) {
		this.stopFly = stopFly;
	}

	@Column(name = "FILE_NAME", nullable = false, length = 50)
	public String getFileName() {
		return this.fileName;
	}

	public void setFileName(String fileName) {
		this.fileName = fileName;
	}

	@Column(name = "URL", nullable = false, length = 100)
	public String getUrl() {
		return this.url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "CREATE_TIME", nullable = false, length = 19)
	public Date getCreateTime() {
		return this.createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	@Column(name = "USER_ID", nullable = false)
	public long getUserId() {
		return this.userId;
	}

	public void setUserId(long userId) {
		this.userId = userId;
	}

}
